#include "Style.hpp"

Style::Style()
{}

Style::~Style()
{
	unsigned int i, j, k;
	
	for (i = Chess::WHITE ; i != (Chess::BLACK + 1) ; i++)
	{
		for (j = Piece::PAWN ; j != (Piece::KING + 1) ; j++)
		{
			for (k = Style::P_STANDARD ; k != (Style::P_CHOICE + 1) ; k++)
				delete pixpieces[i][j][k];
		}
		
		for (j = Style::C_STANDARD ; j != (Style::C_CHOICE + 1) ; j++)
			delete pixcells[i][j];
	}
	
	delete pixbg;
}

const string&	Style::getName() const
{	return (name);	}

QPixmap* Style::getPiecePixmap(Chess::Color color, Piece::Type ptype, Style::PieceHighlight highlight) const
{	return pixpieces[color][ptype][highlight];	}

QPixmap* Style::getCellPixmap(Chess::Color color, Style::CellHighlight highlight) const
{	return pixcells[color][highlight];	}

QPixmap* Style::getBackgroundPixmap() const
{	return pixbg;	}
